$(function () {
    $('.submitBtn').click(function () {
        var a = $('#form').serialize();
        console.log(a);
        var password = $('#password').val();
        if (password === "123456") {
            $.ajax({
                url: '/api/press/input?a=hello&b=world',
                type: 'POST',
                dataType: 'JSON',
                data: $('#form').serialize(),
                success: function (resp) {
                    if (resp && resp.code) {
                        $('.information').html('Submit succeed!');
                        setTimeout(function () {
                            $('#passwordInput').removeClass('in');
                            $('.modal-backdrop').removeClass('in');
                            // $('#passwordInput').addClass('hide');
                        }, 2000);

                    }
                }
            });
        } else {
            $('.information').html('You got a wrong password!');
        }
    });

});